{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "29cd4a41",
   "metadata": {},
   "source": [
    "### 2-1 用Python 做计算"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ebfec667",
   "metadata": {},
   "source": [
    "\n",
    "假设读者到麦当劳打工，一小时可以获得120元时薪，如果想计算一天工作8小时，可以获得多少工资？我们可以用计算器执行 “120x8”，然后得到执行结果。在Jupyter Notebook中，我们也可以直接在代码单元格中输入“120x8”，然后按下Shift+Enter键，就可以得到执行结果960。在Python中，我们也可以用类似的方式执行数学运算，例如："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "ddf8710d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "960"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "120 * 8"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5b4694c2",
   "metadata": {},
   "source": [
    "如果一年实际工作天数是 300天，可以用下列方式计算一年所得。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "865613dd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "288000"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "120 * 8 * 300"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "43c89684",
   "metadata": {},
   "source": [
    "如果读者一个月花费9000元，可以用下列方式计算一年可以存储多少钱。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "efb12e16",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "18000"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "9000 * 2"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7fdb6b98",
   "metadata": {},
   "source": [
    "### 2-2 认识变量"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d1d405be",
   "metadata": {},
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
